Public Class frmKEEPING_LIST
    Dim FromDate As Date
    Private Sub btnClose_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnClose.Click
        Me.Close()
    End Sub

    Private Sub btnDate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDate.Click
        Dim frm As New frmCalendar
        frm.ShowDialog()
        Search()
    End Sub

    Private Sub frmKEEPING_LIST_FormClosed(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosedEventArgs) Handles Me.FormClosed
        Try
            GC.Collect()
            Me.Dispose()
        Catch ex As Exception

        End Try
    End Sub

    Private Sub frmKEEPING_LIST_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        PublicFunction.NewFormLoad(Me)
        FromDate = PublicVariable.SystemDate
        vlDate.Text = FromDate.ToString(PublicVariable.DateTimeFormat)
        Search()
    End Sub
    Private Sub Search()
        Dim arName As New ArrayList
        arName.Add("@DATE")
        Dim arVal As New ArrayList
        arVal.Add(FromDate)
        GridKeeping.DataSource = BLL.ObjectGetBy("KEEPING_LOAD_BYDATE", arName, arVal)
    End Sub

    Private Sub btnDelete_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDelete.Click
        Dim dt As DataTable
        Dim arName As New ArrayList
        arName.Add("@ID")
        Dim arVal As New ArrayList
        arVal.Add(GridKeeping.CurrentRow.Cells("ID").Value)
        dt = BLL.ObjectGetBy("KEEPING_DELETE", arName, arVal)
        'BLL.ReturnXML("KEEPING", dt)
        Search()
    End Sub

    Private Sub btnGetOut_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnGetOut.Click

        Dim dt As DataTable
        Dim arName As New ArrayList
        arName.Add("@ID")
        Dim arVal As New ArrayList
        arVal.Add(GridKeeping.CurrentRow.Cells("ID").Value)
        dt = BLL.ObjectGetBy("KEEPING_GETOUT", arName, arVal)
        'BLL.ReturnXML("KEEPING", dt)
        Search()
    End Sub
End Class